import 'package:json_annotation/json_annotation.dart';

part 'version_info.g.dart';

@JsonSerializable()
class VersionInfo extends Object {
  @JsonKey(name: 'new_version')
  String newVersion;

  @JsonKey(name: 'apk_url')
  String apkUrl;

  @JsonKey(name: 'upgrade_tips')
  String upgradeTips;

  @JsonKey(name: 'size')
  String size;

  VersionInfo(
    this.newVersion,
    this.apkUrl,
    this.upgradeTips,
    this.size,
  );

  factory VersionInfo.fromJson(Map<String, dynamic> srcJson) =>
      _$VersionInfoFromJson(srcJson);

  Map<String, dynamic> toJson() => _$VersionInfoToJson(this);
}
